#!/bin/bash
A=(this is an example of shell script)
echo ${A[0]} ${A[2]} ${A[3]} ${A[6]} 
echo $A[6]
echo $A
echo ${A[8]}

echo -n "Please enter TERM1(default is ansi) ->"
read terminal
TERM1=${terminal:-ansi}
echo "terminal type is $TERM1 now."
echo "terminal=$terminal"

echo -n "Please enter TERM1(default is ansi) ->"
read terminal
TERM1=${terminal:=ansi}
echo "terminal type is $TERM1 now."
echo "terminal=$terminal"

echo -n "Please enter TERM1(default is ansi) ->"
read terminal
TERM1=${terminal:+ansi}
echo "terminal type is $TERM1 now."
echo "terminal=$terminal"

echo -n "Please enter TERM1(default is ansi) ->"
read terminal
TERM1=${terminal:?ansi}
echo "terminal type is $TERM1 now."
echo "terminal=$terminal"

